{% extends "core/base.html" %}

{% load trans from i18n %}
{% load restructuredtext from markup %}

{% block title %}{% trans "Mainpage" %}{% endblock %}

{% block content %}
  <div id="articles">
    {% if articles.count %}
      {% for article in articles %}
        <div class="article">
          <time datetime="{{ article.updated_at.isoformat }}">{{ article.updated_at|date:"m F, Y"|upper }}</time>
          <h1 class="entry-title">
            <a href="{% url blog-detail article.slug %}">{{ article.title }}</a>
          </h1>
          <div class="article-content">
            {{ article.content|restructuredtext }}
          </div>
        </div>
      {% endfor %}
      <h3 class="blog-archives">
        <a href="#">{% trans "Blog Archives" %}</a>
      </h3>
    {% else %}
      <p class="set-content-margin">{% trans "There's no post for now." %}</p>
    {% endif %}
  </div>
{% endblock %}
